local hx__peibanxinmu = fk.CreateSkill {
  name = "hx__peibanxinmu",
  tags = { Skill.Compulsory }
}


hx__peibanxinmu:addEffect(fk.BeforeTurnOver, {
  anim_type = "support",
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill(hx__peibanxinmu.name)
  end,
  on_use = function (self, event, target, player, data)
    local room = player.room
    if player.faceup then
      player:drawCards(1,hx__peibanxinmu.name)
    else
      room:recover{ num = 1, skillName = hx__peibanxinmu.name, who = player, recoverBy = player }
    end
  end,
})

return hx__peibanxinmu
